#ifndef _DevicesBeep_H_
#define _DevicesBeep_H_



#define BEEP_OPEN()  gpio_bit_set(GPIOC, GPIO_PIN_14)
#define BEEP_CLOSE() gpio_bit_reset(GPIOC, GPIO_PIN_14)


/* 一个周期内，开200ms、关800ms */
#define BEEP_OPEN_DEF_TIME  200
#define BEEP_CLOSE_DEF_TIME 800



typedef enum {
    BEEP_DISABLE = 0,
    BEEP_NORMAL,
    BEEP_CIRCULAR,
}BeepStateEnum;


typedef struct{
    BeepStateEnum state;
    int8_t cntSet;
    int16_t timeOpen;
    int16_t timeClose;
    int16_t timeNow;
}BeepInfoType;






void vBeepInit(void);
void vBeepStateMachine(BeepInfoType *ptypeBeep);
void vBeepMachine(void);
BeepInfoType *ptypeBeepGetInfo(void);


#endif
